﻿using System.Configuration.Abstractions;

namespace Sustainalytics.Synchronization.Validation.Log
{
    public class EmailServerSettings
    {
        public EmailServerSettings(IAppSettings settings)
        {
            this.Port = int.Parse(settings.AppSetting("SMTPServerPort"));
            SMTPServer = settings.AppSetting("SMTPServer");
            Credentials = new System.Net.NetworkCredential(settings.AppSetting("SMTPUserName"), settings.AppSetting("SMTPPassword"));
        }

        public int Port { get; private set; }

        public string SMTPServer { get; private set; }

        public System.Net.NetworkCredential Credentials { get; private set; }
    }
}